Rehabilitation using motorized glove for stroke and spinal cord injury